<template>
  <view class="page-wrapper">
    <scroll-view 
      class="content-scroll-view" 
      scroll-y="true"
      :show-scrollbar="false"
      enable-flex
    >
      <view class="container">
        <view class="user-info">
          <image class="avatar" src="/static/logo.png"></image>
          <view class="user-details">
            <text class="username">用户名</text>
            <text class="user-role">学生</text>
          </view>
        </view>
        
        <view class="menu-list">
          <view class="menu-item">
            <text class="menu-icon">📚</text>
            <text class="menu-text">学习记录</text>
            <text class="menu-arrow">></text>
          </view>
          <view class="menu-item">
            <text class="menu-icon">📋</text>
            <text class="menu-text">我的收藏</text>
            <text class="menu-arrow">></text>
          </view>
          <view class="menu-item">
            <text class="menu-icon">🔔</text>
            <text class="menu-text">消息通知</text>
            <text class="menu-arrow">></text>
          </view>
          <view class="menu-item">
            <text class="menu-icon">⚙️</text>
            <text class="menu-text">设置</text>
            <text class="menu-arrow">></text>
          </view>
        </view>
      </view>
    </scroll-view>
  </view>
</template>

<script setup>
import { ref, onMounted } from 'vue'

onMounted(() => {
  // 这里可以添加获取用户信息的逻辑
  console.log('个人页面已加载')
})
</script>

<style scoped lang="scss">
.page-wrapper {
  height: 100vh;
}

.content-scroll-view {
  height: 100%;
  background-color: #f5f5f5;
  overflow: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  
  &::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
}

.container {
  min-height: 100%;
  padding-bottom: 120rpx; /* 确保内容不被底部导航栏遮挡 */
}

.user-info {
  display: flex;
  align-items: center;
  padding: 40rpx;
  background-color: #fff;
}

.avatar {
  width: 120rpx;
  height: 120rpx;
  border-radius: 60rpx;
  margin-right: 30rpx;
  background-color: #eee;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.username {
  font-size: 36rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 10rpx;
}

.user-role {
  font-size: 28rpx;
  color: #999;
}

.menu-list {
  margin-top: 20rpx;
  background-color: #fff;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 30rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.menu-icon {
  font-size: 36rpx;
  margin-right: 20rpx;
}

.menu-text {
  flex: 1;
  font-size: 30rpx;
  color: #333;
}

.menu-arrow {
  font-size: 30rpx;
  color: #999;
}
</style> 